package com.yugao.fintech.antelope.pay.common.model.mq;

import com.yugao.fintech.antelope.base.model.module.mq.AbstractMQ;
import com.yugao.fintech.antelope.base.model.module.mq.BaseMqPayload;


@Getter
@Setter
public class ResetIsvMchAppInfoConfigMQ extends AbstractMQ {
    public static final String QUEUE = "pay_service.reset_isv_mch_app_info_config.queue";

    /** 内置msg 消息体定义 **/
    private MsgPayload payload;

    // 重置类型 （枚举类型，无法json反序列化）
    public static final byte RESET_TYPE_ISV_INFO = 1;
    public static final byte RESET_TYPE_MCH_INFO = 2;
    public static final byte RESET_TYPE_MCH_APP = 3;

    public ResetIsvMchAppInfoConfigMQ(MsgPayload msgPayload) {
        super(msgPayload);
    }


    @Data
    @EqualsAndHashCode(callSuper = true)
    @AllArgsConstructor
    public static class MsgPayload extends BaseMqPayload {
        /** 重置类型 **/
        private byte resetType;

        /** isvNo **/
        private String isvNo;

        /** mchNo **/
        private String mchNo;

        /** appId **/
        private String mchAppId;
    }

    /** 构造MQModel , 一般用于发送MQ时 **/
    public static ResetIsvMchAppInfoConfigMQ build(Byte resetType, String isvNo, String mchNo, String appId){
        return new ResetIsvMchAppInfoConfigMQ(new MsgPayload(resetType, isvNo, mchNo, appId));
    }
}
